import { defineStore } from 'pinia';

export const jiaoshiyurenStore = defineStore('jiaoshiyuren', {
    state: () => ({
        tempMeetingRecord: {
            meetingType: '',
            meetingTypeValue: null,
            date: '',
            time: '',
            content: '',
            files: [] as Array<{
                name: string;
                size?: number;
                type?: string;
                url?: string;
            }>,
            selectedClassDisplay:'',
            selectedClass:''
        }
    }),
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'jiaoshiyuren_storage', // 存储的key
                storage: localStorage, // 使用localStorage
                paths: ['tempMeetingRecord'] // 只持久化tempMeetingRecord
            }
        ]
    }
});